﻿@model IEnumerable<UserInfoViewModel>

@{
    ViewBag.Title = "Index";    
}

<h2>User list</h2>
<table>
    <thead>
        <tr>
            <td>Account Name</td>
            <td>Role</td>
        </tr>
    </thead>

    @foreach (var u in Model)
    {                
        if (ViewBag.EditName == u.AccountName)
        {
            @Html.Partial("_EditUserPartial", u)             
        }
        else
        {            
            @Html.Partial("_DisplayUserPartial", u)        
        }        
    }
</table>
